plat/synquacer: enable OP-TEE logic only if SPD_opteed is set
authorArd Biesheuvel <[email protected]>
Sat, 29 Dec 2018 18:40:31 +0000 (19:40 +0100)
committerArd Biesheuvel <[email protected]>
Tue, 15 Jan 2019 16:51:23 +0000 (17:51 +0100)
The logic that initializes the BL32 entry point data structure
should only be executed if we are in fact loading OP-TEE, and
not if BL32_BASE is set for other reasons (i.e., when enabling
SPM)

Signed-off-by: Ard Biesheuvel <[email protected]>
plat/socionext/synquacer/include/platform_def.h
plat/socionext/synquacer/platform.mk
plat/socionext/synquacer/sq_bl31_setup.c

index de6be7d231f4c89fd3de48e48cf42c042f801b9f..c5bf7d5a8fd05dd715ec1a45eb032d131fec2c6a 100644 (file)
@@ -38,6 +38,8 @@
 #define BL31_SIZE                      0x00080000
 #define BL31_LIMIT                     (BL31_BASE + BL31_SIZE)
 
+#define BL32_BASE                      0xfc000000
+
 #define PLAT_SQ_CCN_BASE               0x32000000
 #define PLAT_SQ_CLUSTER_TO_CCN_ID_MAP                                  \
                                        0,      /* Cluster 0 */         \
index 1bee20abbb66ae21a7063c890b8e35ecdaa463e4..ff46056580b4162c2534ff7f4c45469d1e17adf2 100644 (file)
@@ -17,10 +17,6 @@ ERRATA_A53_855873            := 1
 # Libraries
 include lib/xlat_tables_v2/xlat_tables.mk
 
-ifeq (${SPD},opteed)
-TF_CFLAGS_aarch64      +=      -DBL32_BASE=0xfc000000
-endif
-
 PLAT_PATH              :=      plat/socionext/synquacer
 PLAT_INCLUDES          :=      -I$(PLAT_PATH)/include          \
                                -I$(PLAT_PATH)/drivers/scpi     \
index f8d252622c7c72f5a8ffbe7618c3d3e27e5faea6..cb711862e51b1f9a036d66e54f9d13f7f026e808 100644 (file)
@@ -76,7 +76,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
        /* Initialize power controller before setting up topology */
        plat_sq_pwrc_setup();
 
-#ifdef BL32_BASE
+#ifdef SPD_opteed
        struct draminfo di = {0};
 
        scpi_get_draminfo(&di);
@@ -98,7 +98,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
        } else {
                NOTICE("OP-TEE has not been loaded by SCP firmware\n");
        }
-#endif /* BL32_BASE */
+#endif /* SPD_opteed */
 
        /* Populate entry point information for BL33 */
        SET_PARAM_HEAD(&bl33_image_ep_info,